package com.xfcy.blog.common.enums;

/**
 * @author 晓风残月Lx
 * @date 2023/4/9 9:48
 */
public enum ResultCode {

    UNKOWN_EXCEPTION(10000,"系统未知异常"),

    VAILID_EXCEPTION(10001,"参数格式校验失败"),

    ASSERT_EXCEPTION(10002, "操作失败"),

    ERROR_EXCEPTION_MOBILE_CODE(10003,"验证码不正确或已过期，请重新输入"),
    // 成功
    SUCCESS(200, "操作成功！"),
    // 失败
    FAILURE(400, "操作失败，请重试！"),

    ERROR_MUST_REGISTER(10017,"请先注册帐号!"),

    ERROR_DEFAULT(500,"系统繁忙，请稍后重试"),

    ERROR_PASSWORD(-8,"用户帐号或者密码错误!"),

    EMAIL_DISABLE_LOGIN(-12, "该邮箱账号已被管理员禁止登录"),

    EMAIL_IS_EXIST(-11,"该邮箱已注册，请直接登录!"),
    NOT_LOGIN(401, "请先登录"),

    DATA_TAG_IS_EXIST(10021,"该数据标签已存在!"),

    CRAWLING_ARTICLE_FAILED(10022,"抓取文章失败!"),

    NOT_REGISTER(401, "请先注册");


    private Integer code;
    private String desc;

    ResultCode(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
